﻿package mortal.game.view.lotteryDraw
{
    import Message.Game.*;
    import mortal.game.events.*;
    import mortal.game.mvc.*;
    import mortal.mvc.core.*;

    public class lotteryDrawProxy extends Proxy
    {

        public function lotteryDrawProxy()
        {
            return;
        }// end function

        public function play(param1:int, param2:int) : void
        {
            rmi.iPlayerPrx.luckLottery_async(new AMI_IPlayer_luckLottery(null, null, param2), param1, param2);
            return;
        }// end function

        public function onSuccessPlay(param1:AMI_IPlayer_luckLottery, param2:int) : void
        {
            Dispatcher.dispatchEvent(new DataEvent(EventName.LotteryDrawSuccess, int(param1.userObject)));
            return;
        }// end function

        public function getReward(param1:Array) : void
        {
            var _loc_2:Boolean = false;
            if (param1 == null)
            {
                _loc_2 = true;
            }
            rmi.iPlayerPrx.getLotteryItems_async(new AMI_IPlayer_getLotteryItems(), param1, _loc_2);
            return;
        }// end function

        public function requestMyRecode(param1:int) : void
        {
            rmi.iPlayerPrx.getLotteryRecords_async(new AMI_IPlayer_getLotteryRecords(this.onReceiveMyRecord, null, param1), lotteryRecordType.Record_Lottery_Mine, param1);
            return;
        }// end function

        public function requestBAreaRecode(param1:int) : void
        {
            rmi.iPlayerPrx.getLotteryRecords_async(new AMI_IPlayer_getLotteryRecords(this.onReceiveBAreaRecode, null, param1), lotteryRecordType.Record_Lottery_BArea, param1);
            return;
        }// end function

        public function requestRareRecord(param1:int) : void
        {
            rmi.iPlayerPrx.getLotteryRecords_async(new AMI_IPlayer_getLotteryRecords(this.onReceiveRareRecode, null, param1), lotteryRecordType.Record_Lottery_Rare, param1);
            return;
        }// end function

        public function onReceiveMyRecord(param1:AMI_IPlayer_getLotteryRecords, param2:Array) : void
        {
            Dispatcher.dispatchEvent(new DataEvent(EventName.LotteryDrawInfoUpdate, {type:lotteryRecordType.Record_Lottery_Mine, info:param2, boxLevel:int(param1.userObject)}));
            return;
        }// end function

        public function onReceiveBAreaRecode(param1:AMI_IPlayer_getLotteryRecords, param2:Array) : void
        {
            Dispatcher.dispatchEvent(new DataEvent(EventName.LotteryDrawInfoUpdate, {type:lotteryRecordType.Record_Lottery_BArea, info:param2, boxLevel:int(param1.userObject)}));
            return;
        }// end function

        public function onReceiveRareRecode(param1:AMI_IPlayer_getLotteryRecords, param2:Array) : void
        {
            Dispatcher.dispatchEvent(new DataEvent(EventName.LotteryDrawInfoUpdate, {type:lotteryRecordType.Record_Lottery_Rare, info:param2, boxLevel:int(param1.userObject)}));
            return;
        }// end function

    }
}
